package com.woniuxy.login.exception;

import com.woniuxy.common.CommonResult;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler(SeckillException.class)
    public CommonResult seckillExceptionHandler(SeckillException e){
        return CommonResult.fail(e.getCode(),e.getMessage());
    }
}
